
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="UTF-8">
<meta content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="static/css/login.css" media="all" />
<link rel="stylesheet" type="text/css" href="static/layui/css/layui.css" media="all" />
<style type="text/css">
#form{
	display: none;
}
</style>
</head>
<body>
	<!--<video class="video-player" preload="auto" autoplay="autoplay" loop="loop" data-height="1080" data-width="1920" height="1080" width="1920">-->
	<!--<source src="/images/login.mp4" type="video/mp4">-->
	<!--&lt;!&ndash; 此视频文件为支付宝所有，在此仅供样式参考，如用到商业用途，请自行更换为其他视频或图片，否则造成的任何问题使用者本人承担，谢谢 &ndash;&gt;-->
	<!--</video>-->
	<img class="video-player" height="100%" width="100%" src="static/images/banner5.jpg">
	<div class="video_mask"></div>
	<div class="login">
		<h1 class="title">OSSJK-OA</h1>
		
		<!-- 微信扫码登录的div -->
		<div id="weixin" class="loginDiv">
			<p>微信扫码登录</p>
			<div title="微信扫码登录" id="login_container" style="width: 200px;"></div>
		</div>
		
		<div id="form" class="loginDiv">
		<form class="layui-form" >
			<div class="layui-form-item">
				<input class="layui-input" name="name" value="admin1" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
			</div>
			<div class="layui-form-item">
				<input class="layui-input" name="pwd" value="OSSJK2017" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
			</div>
			<!-- <div class="layui-form-item form_code">
				<input class="layui-input" name="verifyCodeActual" placeholder="验证码" lay-verify="required" type="text" autocomplete="off">
				<div class="code">
					<img id="captcha_img" alt="点击更换" title="点击更换" onclick="refresh()" src="/captcha/getCaptcha.jpg" width="116" height="36" />
				</div>
			</div> -->
			<button class="layui-btn login_btn" lay-submit="" lay-filter="login">登录</button>
		</form>
		</div>
	</div>
</body>
<script type="text/javascript" src="static/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="static/layui/layui.js"></script>
<!-- <script type="text/javascript" src="static/custom/js/constant.js"></script>-->
<script type="text/javascript" src="static/custom/js/cache.js"></script> 
<script type="text/javascript" src="static/custom/js/common.js"></script>
<script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> 

<script type="text/javascript">
	//解决内嵌问题
	if (window != window.top) {
		window.top.location = location;
	}
	var obj = new WxLogin({
		id : "weixin",
		appid : "wxcd2acf12dfc82eb6",
		scope : "snsapi_login",
		redirect_uri : "http://oa2tst.ossjk.com/ossjk-oa/wxlogin",
		state : "",
		style : "black",
		href : "https://oa.ossjk.cn/css/wxlgn.css"
	});
	function refresh() {
		document.getElementById('captcha_img').src = "/captcha/getCaptcha.jpg?" + Math.random();
	}
	layui.use([ 'form', 'layer' ], function() {
		var form = layui.form;
		var layer = parent.layer === undefined ? layui.layer : parent.layer;
		var $ = layui.jquery;
		var loginApi = "login";

		loadAjax( "getAttribute", "get", null, function(response) {
			baseCallBack(response, function(response) {
				cache.attribute.set(response.data);
				var attribute = JSON.parse(cache.attribute.get());
				if(attribute.systemname)
				$(".title").html(attribute.systemname);
			});
		});

		//登录按钮事件
		form.on("submit(login)", function(data) {
			loadAjax( loginApi, "post", data.field, function(response) {
				baseCallBack(response, function(response) {
					cache.token.set(response.data);
					location.href = "./"
				});
			});
			return false;
		})
		
		  $("#weixin").hide();
		  $("#form").show();
		 
		$(".title").dblclick(function() {
			if($("#weixin").is(":hidden")){
			       $("#weixin").show();    //如果元素为隐藏,则将它显现
			}else{
			      $("#weixin").hide();     //如果元素为显现,则将其隐藏
			}
			if($("#form").is(":hidden")){
			       $("#form").show();    //如果元素为隐藏,则将它显现
			}else{
			      $("#form").hide();     //如果元素为显现,则将其隐藏
			}
		});
		
	});
</script>
</html>